import * as actionTypes from './constant';
import { addPersonRequest } from '@/services/action';

export const addPersonAction = (userinfo) => {
  return async (dispatch) => {
    await addPersonRequest(userinfo).then((res) => {
      dispatch({
        type: actionTypes.ADD_PERSON,
        userinfo: res.data,
      });
    });
  };
};
